package cash.cmp.personal_financial_system.service;

import cash.cmp.personal_financial_system.model.Role;
import cash.cmp.personal_financial_system.model.User;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public interface UserService {

    public User findUserById(Integer id);

    public User findUserByWechat(String wechatId);

    public User findUserByAlipay(String alipayId);

    public Map<String, String> getUser();

    public List<Role> getUserRolesById(Integer id);

    public User findUserByTel(String tel);

    public List<User> findAllUser();

    public List<User> findAllByPage(int page, int pageSize);

    List<User> findByAll(Integer id, String tel, Integer sex,String city ,int page, int pageSize);

    List<User> findByLike(String like);
    int countByAll(Integer id, String tel, Integer sex,String city);

    public int countUser();

    public Boolean updateUser(User user);

    Boolean updateImage(String headImage , int id);
    Boolean updateWx(String WeChatId, int id);
    Boolean updateApiPay(String ApiPayId, int id);
    Boolean updateTel(String tel, int id);

    public Boolean deleteUser(Integer id);

    public Boolean saveList(List<User> list);
}
